package ic.doc.co2nudge.services;

import ic.doc.co2nudge.shared.GraphType;
import ic.doc.co2nudge.shared.model.DataType;
import ic.doc.co2nudge.shared.model.ForecastData;
import ic.doc.co2nudge.shared.model.TransportType;
import ic.doc.co2nudge.shared.model.Trip;
import ic.doc.co2nudge.shared.model.TripOption;
import ic.doc.co2nudge.shared.model.User;
import ic.doc.co2nudge.shared.model.UserData;

import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.TreeMap;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.googlecode.objectify.Key;

@RemoteServiceRelativePath("dataservice")
public interface DataService extends RemoteService {
	
	HashMap<String,List<? extends DataType>> loadDictionaryData();
	
	List<TransportType> getTransportTypes();
	
	List<Trip> getAllTrips();
	
	List<Trip> getTripsByYear(Date date, User user);
	
	User getUser(String username, String password);
	
	Boolean storeDictionary(List<TransportType> transportTypes);
	
	void storeTransportTypes(List<TransportType> types);
	
	Boolean storeTrip(Trip trip, User user);
	
	Boolean storeTripOption(TripOption option);	
	
	List<TripOption> generateTripOptions(Double distance);
	
	Double getTripDistance(String from, String to);
	
	HashMap<String, Double> loadStatisticalData(GraphType graphType);

	ForecastData loadPredictionData(User user, Date date);
	
	List<UserData> loadAnalysisData();
	
	void storeUser(User user);
	
	void storeUsers(List<User> users);
	
	HashMap<String, Double> calcUsersCosts();
}
